﻿using Om.Core.Singleton;

namespace Om.Core.Extension;

public static class CaptureHelper
{
    /// <summary>
    /// 获取当天的文件夹路径
    /// </summary>
    /// <returns></returns>
    public static string GetFolderPath()
    {
        var path = Path.Combine(DevicesConfig.Instance.CapturePath, DateTime.Today.ToString("yyyy-MM-dd"));
        Directory.CreateDirectory(path);
        return path;
    }
    /// <summary>
    /// 获取文件全路径
    /// </summary>
    /// <param name="suffix"></param>
    /// <returns></returns>
    public static string GetFileFullPath(string suffix)
    {
        var folderPath = GetFolderPath();
        Directory.CreateDirectory(folderPath);
        var fileName = DateTime.Now.ToString("HHmmssfff")+suffix + ".jpg";
        var filePath = Path.Combine(folderPath, fileName);
        return filePath;
    }


}